home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 August / Ahoy_Magazine_85-08_1985_Double_L.d64 / sawing wood (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  798b  |  27 lines

  1. 0 print"[147]":poke53280,0:poke53281,5:poke646,1
  2. 1 rem sound effects
  3. 2 rem sawing wood
  4. 10 gosub 900:goto 100
  5. 20 for i=1 to 2:poke ad(i),0 :poke sr(i),243:next
  6. 25 poke ad(0),64:poke sr(0),66
  7. 30 poke fh(1),255:poke fh(2),12 :poke fh(0),200
  8. 35 poke vl,15:print "."
  9. 40 poke gt(1),129:poke gt(2),129:poke gt(0),21
  10. 45 for i=0 to 7:poke vl,5:poke vl,15:for x=0 to int(4*rnd(9)):next:next
  11. 50 for i=15 to 0 step-1:poke vl,i:next
  12. 55 for i=1 to 15:poke vl,i:for x=0 to 3:next:next
  13. 60 for i=0 to 2:poke gt(i),0:next
  14. 90 return
  15. 99 rem routine to play sounds when shift is pressed
  16. 100 print "press shift to hear sound";
  17. 110 if peek(653)=0 then 110
  18. 120 gosub 20:goto 100
  19. 898 rem routine to set up variables
  20. 899 rem set up sound control addresses
  21. 900 fl(0)=54272:fh(0)=54273:gt(0)=54276:ad(0)=54277:sr(0)=54278
  22. 905 for i=1 to 2:x=i*7:fl(i)=fl(0)+x:fh(i)=fh(0)+x:gt(i)=gt(0)+x:ad(i)=ad(0)+x
  23. 906 sr(i)=sr(0)+x:next
  24. 909 rem set volume address
  25. 910 vl=54296
  26. 990 return
  27.